<template>
	<div class="dimensionalcode">
	   <div class="header">
			<div class="go">
				<i class="el-icon-erp-shangyiye" @click="back"></i>
				<p>取货码</p>
			</div>
		</div>
		<div class="body">
		   <img :src="imgsrc">
		   <p>请在取货时展示此二维码</p>
		</div>
	</div>
</template>

<script>
	export default {
		name:'dimensionalcode',
		data () {
			return {
				rentSerial:'',
				imgsrc:''
			}
		},
		created () {
			this.getCode ()
		},
		monted () {
		},
		methods:{
			//获取二维码
			getCode () {
				this.rentSerial = this.$route.query.rentSerial;
				this.imgsrc = this.$store.state.reqUrl + '/customer/orders/waitForPick/pickCode/' + this.rentSerial;
                //this.imgsrc = 'http://192.168.0.107:8080/customer/orders/waitForPick/pickCode/' + this.rentSerial;
				/*this.$http.get(this.$store.state.reqUrl + '/customer/orders/waitForPick/pickCode/' + this.rentSerial, {}).then(res => {
		  		if(res.status == 200) {
		  			this.imgsrc = res.data;
		  		 }
		  	  })*/
			},
			back () {
				this.$router.go(-1)
			}
		}
	}
</script>

<style lang="less" scoped>
  .dimensionalcode{
  	    width: 100%;
		height: 100%;
		top:0;
		left:0;
		position:fixed;
		z-index: 888;
		background:rgba(0,0,0,0.8);
  	.header{
    		width:100%;
    		z-index: 44;
    		color:#FFFFFF;
    		.go{
    			display: flex;
    			width:100%;
    			height: 100px;
    			i{   
    				width:80px;
    				font-size: 34px;
    				text-align: center;
    				line-height: 100px;   				
    			}
    			p{
    				flex: 1;
    				font-size: 34px;
    				line-height: 100px;
    			}
    		}
    	} 
    	.body{
  	   	  position: relative;
  	   	  width:80%;
  	   	  height: 60%;
  	   	  background: #FFFFFF;
  	   	  margin:0 auto;
  	   	  margin-top: 60px;
  	   	  img{
  	   	  	width:100%;
  	   	  	height: 80%;
  	   	  	margin:0 auto;
  	   	  	padding-top:55px;
  	   	  }
  	   	  p{
  	   	  	width:100%;
  	   	  	position: absolute;
  	   	  	font-size: 28px;
  	   	  	color: gray;
  	   	  	bottom:30px;
  	   	  	left: 50%;
  	   	  	margin-left: -26%;
  	   	  }
  	   }
  }
</style>